package com.ui.adapter;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.View;

import com.core.sdk.ui.adapter.MyBaseAdapter;
import com.core.sdk.ui.holder.BaseViewHolder;
import com.core.sdk.ui.holder.IOnScrollListener;
import com.ui.R;
import com.ui.holder.ShopHolder;
import com.ui.model.Shop;

public class ShopAdapter extends MyBaseAdapter<Shop, Void> {

	private List<IOnScrollListener> listenerList = new ArrayList<IOnScrollListener>();

	public ShopAdapter(Context act) {
		super(act);
	}

	@Override
	protected void onInitViewType() {
		addViewType(Shop.class, R.layout.item_shop);
	}

	@Override
	protected BaseViewHolder<Shop, Void> onCreateViewHolder(View view, Context act) {
		BaseViewHolder<Shop, Void> holder = new ShopHolder(view, act);
		listenerList.add(holder);
		return holder;
	}

	@Override
	protected void onDestory() {
		listenerList.clear();
		listenerList = null;
	}

	public List<IOnScrollListener> getListenerList() {
		return listenerList;
	}

}
